﻿@using WebApp.Extensions

@Html.Scripts(
    @<script type="text/javascript">
        require(['Shared/_ModalBox'], function (api) {
            $(function () { api.exec('ModalBox'); });
        });
    </script>
)

<!-- Search Help Modal -->
<div class="modal fade" id="ModalBox" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="ModalLabel"><span data-bind="text: selectedSectionName()"></span></h4>
            </div>
            <div class="modal-body">
                <div>
                    <ul class="nav nav-tabs" data-bind="foreach: sections">
                        <li data-bind="css: { active: isSelected }">
                            <a href="#" data-bind="click: $parent.selectedSection">
                                <span data-bind="text: name"></span>
                            </a>
                        </li>
                    </ul>
                    <div class="tab-content" data-bind="foreach: {data : sections, afterAdd : loadPartial}">
                        <div class="tab-pane spacer" data-bind="attr: { 'tab-pane-name': name }, css: paneCss()"></div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>